.control-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  max-height: calc(100vh - 40px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  z-index: 1000;
}

.control-panel h2 {
  margin: 0 0 20px 0;
  color: #2c3e50;
  font-size: 1.4em;
  text-align: center;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.control-section {
  margin-bottom: 25px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid #ecf0f1;
  transition: all 0.3s ease;
}

.section-header:hover {
  background: rgba(52, 152, 219, 0.1);
  border-radius: 6px;
  padding: 10px 8px;
}

.section-header h3 {
  margin: 0;
  color: #34495e;
  font-size: 1em;
  border-left: 3px solid #3498db;
  padding-left: 10px;
}

.dropdown-arrow {
  color: #7f8c8d;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.dropdown-arrow.expanded {
  transform: rotate(180deg);
}

.section-content {
  padding: 10px 0;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

.control-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.control-item label {
  font-size: 0.9em;
  color: #2c3e50;
  font-weight: 500;
  min-width: 80px;
}

.control-item input[type="range"] {
  flex: 1;
  margin: 0 10px;
}

.control-item input[type="color"] {
  width: 40px;
  height: 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.control-item input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.control-item select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  background: white;
  font-size: 0.9em;
}

.control-item span {
  min-width: 40px;
  text-align: right;
  font-size: 0.9em;
  color: #7f8c8d;
}

.export-btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s ease;
}

.export-btn:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.instructions {
  font-size: 0.85em;
  color: #7f8c8d;
  line-height: 1.4;
}

.instructions p {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.instructions ul {
  margin: 0;
  padding-left: 16px;
}

.instructions li {
  margin-bottom: 4px;
}

/* Scrollbar styling */
.control-panel::-webkit-scrollbar {
  width: 6px;
}

.control-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
  background: #bdc3c7;
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .control-panel {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    max-height: none;
    margin: 20px 0;
    border-radius: 0;
  }

  .control-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .control-item label {
    min-width: auto;
  }

  .control-item input[type="range"],
  .control-item select {
    width: 100%;
  }
}
